package com.ll.beautymall.bean;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.io.Serializable;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/10/21.
 * 对应content_data
 */
public class ModelContent implements Serializable{

    /**
     * action : beautymall://activity?activity_id=1464944071&activity_type=1&title=0%E5%85%83%E8%B4%AD
     * pic_url : http://gouwu.cdn.yuike.com/data/img/457465/home_model/49fb2c6336010bd6da5e9774462fbc5f.jpg
     * left_part : [{"action":"beautymall://allbuy_list?mid=457465&type=dress&channel_id=1464783721&category_ids=4796,4797,4798,4799,4805,4839,4840,4843,22151,22153,22154,22155,22168,22169,22170&sort=default&title=%E7%A7%8B%E8%A3%85%E6%96%B0%E5%93%81","pic_url":"http://gouwu.cdn.yuike.com/data/img/457465/home_model/718492367eede4c2c6927472843f66a3.jpg"}]
     * right_part : [{"action":"beautymall://allbuy_list?mid=457465&type=shoes&channel_id=1464783950&category_ids=4831&sort=default&title=%E7%94%B7%E7%A5%9E","pic_url":"http://gouwu.cdn.yuike.com/data/img/457465/home_model/6dca9127f92799fbb24636ce61330626.jpg"},{"action":"beautymall://allbuy_list?mid=457465&type=shoes&channel_id=1464783944&category_ids=4849&sort=default&title=%E4%B8%87%E8%83%BD%E6%96%9C%E6%8C%8E%E5%8C%85","pic_url":"http://gouwu.cdn.yuike.com/data/img/457465/home_model/83837bb2217d0e9e26e95e3a40f045d0.jpg"}]
     * sub_title : 品质保证
     * title : 天猫商城
     */

    private ContentDataBean content_data;
    /**
     * content_data : {"action":"beautymall://activity?activity_id=1464944071&activity_type=1&title=0%E5%85%83%E8%B4%AD","pic_url":"http://gouwu.cdn.yuike.com/data/img/457465/home_model/49fb2c6336010bd6da5e9774462fbc5f.jpg","left_part":[{"action":"beautymall://allbuy_list?mid=457465&type=dress&channel_id=1464783721&category_ids=4796,4797,4798,4799,4805,4839,4840,4843,22151,22153,22154,22155,22168,22169,22170&sort=default&title=%E7%A7%8B%E8%A3%85%E6%96%B0%E5%93%81","pic_url":"http://gouwu.cdn.yuike.com/data/img/457465/home_model/718492367eede4c2c6927472843f66a3.jpg"}],"right_part":[{"action":"beautymall://allbuy_list?mid=457465&type=shoes&channel_id=1464783950&category_ids=4831&sort=default&title=%E7%94%B7%E7%A5%9E","pic_url":"http://gouwu.cdn.yuike.com/data/img/457465/home_model/6dca9127f92799fbb24636ce61330626.jpg"},{"action":"beautymall://allbuy_list?mid=457465&type=shoes&channel_id=1464783944&category_ids=4849&sort=default&title=%E4%B8%87%E8%83%BD%E6%96%9C%E6%8C%8E%E5%8C%85","pic_url":"http://gouwu.cdn.yuike.com/data/img/457465/home_model/83837bb2217d0e9e26e95e3a40f045d0.jpg"}],"sub_title":"品质保证","title":"天猫商城"}
     * content_type : 1
     * id : 1465300885
     */

    private String content_type;
    private String id;

    public static ModelContent objectFromData(String str) {

        return new Gson().fromJson(str, ModelContent.class);
    }

    public static List<ModelContent> arrayModelContentFromData(String str) {

        Type listType = new TypeToken<ArrayList<ModelContent>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public ContentDataBean getContent_data() {
        return content_data;
    }

    public void setContent_data(ContentDataBean content_data) {
        this.content_data = content_data;
    }

    public String getContent_type() {
        return content_type;
    }

    public void setContent_type(String content_type) {
        this.content_type = content_type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public static class ContentDataBean implements Serializable{
        private String action;
        private String pic_url;
        private String sub_title;
        private String title;
        /**
         * action : beautymall://allbuy_list?mid=457465&type=dress&channel_id=1464783721&category_ids=4796,4797,4798,4799,4805,4839,4840,4843,22151,22153,22154,22155,22168,22169,22170&sort=default&title=%E7%A7%8B%E8%A3%85%E6%96%B0%E5%93%81
         * pic_url : http://gouwu.cdn.yuike.com/data/img/457465/home_model/718492367eede4c2c6927472843f66a3.jpg
         */

        private List<LeftPartBean> left_part;
        /**
         * action : beautymall://allbuy_list?mid=457465&type=shoes&channel_id=1464783950&category_ids=4831&sort=default&title=%E7%94%B7%E7%A5%9E
         * pic_url : http://gouwu.cdn.yuike.com/data/img/457465/home_model/6dca9127f92799fbb24636ce61330626.jpg
         */

        private List<RightPartBean> right_part;

        public static ContentDataBean objectFromData(String str) {

            return new Gson().fromJson(str, ContentDataBean.class);
        }

        public static List<ContentDataBean> arrayContentDataBeanFromData(String str) {

            Type listType = new TypeToken<ArrayList<ContentDataBean>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public String getAction() {
            return action;
        }

        public void setAction(String action) {
            this.action = action;
        }

        public String getPic_url() {
            return pic_url;
        }

        public void setPic_url(String pic_url) {
            this.pic_url = pic_url;
        }

        public String getSub_title() {
            return sub_title;
        }

        public void setSub_title(String sub_title) {
            this.sub_title = sub_title;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public List<LeftPartBean> getLeft_part() {
            return left_part;
        }

        public void setLeft_part(List<LeftPartBean> left_part) {
            this.left_part = left_part;
        }

        public List<RightPartBean> getRight_part() {
            return right_part;
        }

        public void setRight_part(List<RightPartBean> right_part) {
            this.right_part = right_part;
        }

        public static class LeftPartBean implements Serializable{
            private String action;
            private String pic_url;

            public static LeftPartBean objectFromData(String str) {

                return new Gson().fromJson(str, LeftPartBean.class);
            }

            public static List<LeftPartBean> arrayLeftPartBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<LeftPartBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public String getAction() {
                return action;
            }

            public void setAction(String action) {
                this.action = action;
            }

            public String getPic_url() {
                return pic_url;
            }

            public void setPic_url(String pic_url) {
                this.pic_url = pic_url;
            }
        }

        public static class RightPartBean implements Serializable{
            private String action;
            private String pic_url;

            public static RightPartBean objectFromData(String str) {

                return new Gson().fromJson(str, RightPartBean.class);
            }

            public static List<RightPartBean> arrayRightPartBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<RightPartBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public String getAction() {
                return action;
            }

            public void setAction(String action) {
                this.action = action;
            }

            public String getPic_url() {
                return pic_url;
            }

            public void setPic_url(String pic_url) {
                this.pic_url = pic_url;
            }
        }
    }
}
